using System;
using System.Collections.Generic;
using System.Text;


namespace Rensselaer_Event_Finder.Hibernate.DAO
{
    
     /// The service that facilitates interaction between the database
     /// and the application for the LocationComment class
   
    public class LocationCommentDAO : GenericNHibernateDAO<LocationComment, int>
    {
        /// <summary>
        /// Make the entity persistent. It will be inserted or updated in the database
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        new public LocationComment save(LocationComment entity)
        {
            Globals.getWebService().saveLocationComment(entity.User.Id, entity.Location.Id, Globals.sanitizeSQL(entity.Text));
            Globals.syncDatabase();
            return entity;
        }
    }
}
